<%@page pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="v" tagdir="/WEB-INF/tags"%>
<v:layout>
	<h1>学生列表</h1>
	<form action="<c:url value="/student/list.do" />" method="get" class="form-inline">
		<div class="form-group">
			<label>姓名：</label> <input type="text" name="name" class="form-control" placeholder="学生姓名" value="${param.name }">
		</div>
		<div class="form-group">
			<button class="btn btn-primary">查询</button>
			<a class="btn btn-default" href="<c:url value="/student/add.do" />">增加</a>
		</div>
	</form>
	<table class="table">
		<thead>
			<tr>
				<th>#</th>
				<th>学生姓名</th>
				<th>创建时间</th>
			</tr>
		</thead>
		<tbody>
			<c:if test="${not empty students }">
				<c:forEach items="${students }" var="student" varStatus="vs">
					<tr>
						<td>${vs.count }</td>
						<td>
							<c:out value="${student.name }" default="-" />
						</td>
						<td>
							<fmt:formatDate value="${student.createTime }" pattern="yyyy-MM-dd HH:mm:ss" />
							<fmt:formatNumber value="100000.0000001" pattern="0.00" />
						</td>
					</tr>
				</c:forEach>
			</c:if>
		</tbody>
	</table>
</v:layout>
